
class Animal:
    def __init__(self,name,color,age,sex):
        self.name = name
        self.color = color
        self.age = age
        self.sex = sex
    def shoot(self):
        print(self.name,"在叫")
    def run(self):
        print(self.name,"在跑")


class Cats(Animal):
    def __init__(self, name, color, age, sex, hair="短发"):
        self.name = name
        self.color = color
        self.age = age
        self.sex = sex
        self.hair = hair
    def shoot(self):
        print(self.name,"在喵喵叫")
    def catch_mice(self):
        print(self.name,"捉到了老鼠")


class Dogs(Animal):
    def __init__(self, name, color, age, sex, hair="长发"):
        self.name = name
        self.color = color
        self.age = age
        self.sex = sex
        self.hair = hair
    def look_home(self):
        print(self.name,"会看家")
    def shoot(self):
        print(self.name,"在汪汪叫")


if __name__ == '__main__':
    cat = Cats("Kitty","五颜六色","活了很长时间","公的")
    cat.catch_mice()
    print(cat.name,cat.color,cat.age,cat.sex,cat.hair,"捉到了老鼠")
    dog = Dogs("Tom","绿色","未来穿越过来的狗狗所以年龄是-1048岁","公的")
    dog.look_home()
    print(dog.name,dog.color,dog.age,dog.sex,dog.hair)